package com.ecoolex.discount.sales.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;

public enum DiscountOrderRefundStatus implements EnumInterface<DiscountOrderRefundStatus, Integer> {
	UNKNOWN(0, "未知"),
	APPLY_REFUND(41, "申请退款"),
	APPLY_REFUND_FAILED(42, "申请退款失败"),
	APPLY_REFUND_SUCCEED(43, "申请退款成功"),
	REFUNDING(44, "审核中"),
	REFUND_FAILED(45, "退款失败"),
	REFUND_SUCCEED(46, "退款成功"),
	REFUND_CANCEL(47,"用户取消退款")
	;

	private int real;

	private String describe;

	private DiscountOrderRefundStatus(int real, String describe) {
		this.real = real;
		this.describe = describe;
	}

	@Override
	public Integer real() {
		return real;
	}

	@Override
	public String describe() {
		return describe;
	}

	public static DiscountOrderRefundStatus realValueOf(Integer real) {
		if (Check.notNull(real)) {
			for (DiscountOrderRefundStatus v : values()) {
				if (v.real().equals(real)) {
					return v;
				}
			}
		}
		return null;
	}
}
